<!-- Id Field -->
<div class="form-group col-sm-3">
<div class="form-group">
    {!! Form::label('id', 'Id:') !!}
    <p>{!! $statistics->id !!}</p>
</div>

<!-- Type Field -->
<div class="form-group">
    {!! Form::label('type', 'Type:') !!}
    <p>
        @if ($statistics->type == 1)
            天统计
        @elseif ($statistics->type == 2)
            周统计
        @elseif ($statistics->type == 3)
            月统计
        @elseif ($statistics->type == 4)
            季统计
        @elseif ($statistics->type == 5)
            年统计
        @elseif ($statistics->type == 6)
            全统计
        @endif
    </p>
</div>

<!-- Add Users Count Field -->
<div class="form-group">
    {!! Form::label('add_users_count', '新增用户:') !!}
    <p>{!! $statistics->add_users_count !!}</p>
</div>

<!-- Users Count Field -->
<div class="form-group">
    {!! Form::label('users_count', '用户总数:') !!}
    <p>{!! $statistics->users_count !!}</p>
</div>

<!-- Goods Count Field -->
<div class="form-group">
    {!! Form::label('goods_count', '商品总数:') !!}
    <p>{!! $statistics->goods_count !!}</p>
</div>

<!-- Orders Count Field -->
<div class="form-group">
    {!! Form::label('orders_count', '订单总数:') !!}
    <p>{!! $statistics->orders_count !!}</p>
</div>

<!-- Orders Add Count Field -->
<div class="form-group">
    {!! Form::label('orders_add_count', '新增订单数:') !!}
    <p>{!! $statistics->orders_add_count !!}</p>
</div>

<!-- Orders Add Pay Count Field -->
<div class="form-group">
    {!! Form::label('orders_add_pay_count', '新增付款订单数:') !!}
    <p>{!! $statistics->orders_add_pay_count !!}</p>
</div>

<!-- Orders Return Count Field -->
<div class="form-group">
    {!! Form::label('orders_return_count', '退款订单数:') !!}
    <p>{!! $statistics->orders_return_count !!}</p>
</div>

<!-- Orders Return Amount Field -->
<div class="form-group">
    {!! Form::label('orders_return_amount', '订单退款金额:') !!}
    <p>{!! $statistics->orders_return_amount !!}</p>
</div>

<!-- Orders Return Rate Field -->
<div class="form-group">
    {!! Form::label('orders_return_rate', '订单退款率:') !!}
    <p>{!! $statistics->orders_return_rate !!}</p>
</div>

<!-- Repurchase Count Field -->
<div class="form-group">
    {!! Form::label('repurchase_count', '新增复购人数:') !!}
    <p>{!! $statistics->repurchase_count !!}</p>
</div>

<!-- Repurchase Rate Field -->
<div class="form-group">
    {!! Form::label('repurchase_rate', '30天复购率:') !!}
    <p>{!! $statistics->repurchase_rate !!}</p>
</div>

<!-- Orders Price Amount Field -->
<div class="form-group">
    {!! Form::label('orders_price_amount', '订单总价:') !!}
    <p>{!! $statistics->orders_price_amount !!}</p>
</div>

<!-- Orders Pay Money Amount Field -->
<div class="form-group">
    {!! Form::label('orders_pay_money_amount', '已支付订单总价:') !!}
    <p>{!! $statistics->orders_pay_money_amount !!}</p>
</div>

<!-- Created At Field -->
<div class="form-group">
    {!! Form::label('created_at', '创建时间:') !!}
    <p>{!! $statistics->created_at !!}</p>
</div>

<!-- Updated At Field -->
<div class="form-group">
    {!! Form::label('updated_at', '更新时间:') !!}
    <p>{!! $statistics->updated_at !!}</p>
</div>

</div>
<div class="form-group col-sm-9" style="background: mintcream">
    <div class="box-body">
        <table class="table table-responsive" id="statistics-table">
            <thead>
            <th>昵称</th>
            {{--<th>头像</th>--}}
            <th>订单数</th>
            <th>订单金额</th>
            <th>订单实际付款金额</th>
            <th>订单退款数</th>
            <th>订单退款金额</th>
            </thead>
            <tbody>
            @foreach($statistics->users as $v)
                <tr>
                    <td>{{ $user_arr[$v['user_id']]->nickname }}</td>
{{--                    <td><img src="{{$user_arr[$v['user_id']]->avatar_url}}" alt="" style="width: 60px"></td>--}}
                    <td>{!! $v['order_num'] !!}</td>
                    <td>{!! $v['order_money'] !!}</td>
                    <td>{!! $v['pay_money'] !!}</td>
                    <td>{!! $v['order_return_num'] !!}</td>
                    <td>{!! $v['return_money'] !!}</td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>

    <div class="box-body">
        <table class="table table-responsive" id="statistics-table2">
            <thead>
            <th>商品名</th>
            <th>属性名</th>
            <th>价格</th>
            <th>数量</th>
            <th>退货数量</th>
            </thead>
            <tbody>
            @foreach($statistics->info['goods_rank'] as $v)
                <tr>
                    <td>{{ $goods_arr[$v['goods_id']]->name }}</td>
                    <td>{{ $v['attribute_id']?$attribute_arr[$v['attribute_id']]->name:'' }}</td>
                    <td>{!! $v['price'] !!}</td>
                    <td>{!! $v['number'] !!}</td>
                    <td>{!! $v['return_number'] !!}</td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>
</div>
